home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Tools / Text-Viewer / MSWordView / mswordview_src / helper-scripts / nswordview < prev    next >
Encoding:
Text File  |  1999-11-06  |  552 b   |  29 lines

  1. #!/bin/tcsh
  2.  
  3. if ($#argv != 1) then
  4.     echo "Usage: $0 file.doc"
  5.     exit 1
  6. endif
  7.  
  8. set source = $argv[1]
  9.  
  10. #Generate a unique html filename (/tmp/scriptname.pidnum.html)
  11. set com = $0
  12. set temp = /tmp/$com:t.$$
  13. set html = $temp.html
  14.  
  15. (mswordview $source) >! $html
  16. if ((!(-s $html)) | ($status)) then
  17.     echo "$0: failed to generate HTML file"
  18.     exit 1
  19. endif
  20.  
  21. #File exists and is of length > 0, so open it
  22. nsopen $html
  23.  
  24. #I do NOT remove the html file so that the user
  25. #can click on the "Back" button without generating
  26. #a "file not found" error
  27.  
  28. exit 0
  29.